Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
fast-querystring
Advanced tools
Fast query-string parser and stringifier to replace the legacy node:querystring
module.
npm i fast-querystring
parse
and stringify
methods from node:querystring
module&
separator as defaultstring
foo=bar&foo=baz
parses into {foo: ['bar', 'baz']}
foo=bar&hola
parses into {foo: 'bar', hola: ''}
node:querystring
)const qs = require('fast-querystring')
// Parsing a querystring
console.log(qs.parse('hello=world&foo=bar&values=v1&values=v2'))
// {
// hello: 'world',
// foo: 'bar',
// values: ['v1', 'v2']
// }
// Stringifying an object
console.log(qs.stringify({ foo: ['bar', 'baz'] }))
// 'foo=bar&foo=baz'
All benchmarks are run using Node.js v20.2.0 running on M1 Max.
> node benchmark/parse.mjs
βββββββββββββββββββββββββββββββββββββββββββ€ββββββββββ€ββββββββββββββββββββ€ββββββββββββ
β Slower tests β Samples β Result β Tolerance β
βββββββββββββββββββββββββββββββββββββββββββΌββββββββββΌββββββββββββββββββββΌββββββββββββ’
β query-string β 10000 β 273968.62 op/sec β Β± 1.48 % β
β qs β 9999 β 324118.68 op/sec β Β± 0.99 % β
β querystringify β 1000 β 410157.64 op/sec β Β± 0.68 % β
β @aws-sdk/querystring-parser β 1000 β 431465.20 op/sec β Β± 0.83 % β
β URLSearchParams-with-Object.fromEntries β 5000 β 833939.19 op/sec β Β± 0.97 % β
β URLSearchParams-with-construct β 10000 β 980017.92 op/sec β Β± 2.42 % β
β node:querystring β 10000 β 1068165.86 op/sec β Β± 3.41 % β
β querystringparser β 3000 β 1384001.31 op/sec β Β± 0.95 % β
βββββββββββββββββββββββββββββββββββββββββββΌββββββββββΌββββββββββββββββββββΌββββββββββββ’
β Fastest test β Samples β Result β Tolerance β
βββββββββββββββββββββββββββββββββββββββββββΌββββββββββΌββββββββββββββββββββΌββββββββββββ’
β fast-querystring β 10000 β 1584458.62 op/sec β Β± 2.64 % β
βββββββββββββββββββββββββββββββββββββββββββ§ββββββββββ§ββββββββββββββββββββ§ββββββββββββ
> node benchmark/stringify.mjs
ββββββββββββββββββββββββββββββββ€ββββββββββ€ββββββββββββββββββββ€ββββββββββββ
β Slower tests β Samples β Result β Tolerance β
ββββββββββββββββββββββββββββββββΌββββββββββΌββββββββββββββββββββΌββββββββββββ’
β query-string β 10000 β 314662.25 op/sec β Β± 1.08 % β
β qs β 9500 β 353621.74 op/sec β Β± 0.98 % β
β http-querystring-stringify β 10000 β 372189.04 op/sec β Β± 1.48 % β
β @aws-sdk/querystring-builder β 10000 β 411658.63 op/sec β Β± 1.67 % β
β URLSearchParams β 10000 β 454438.85 op/sec β Β± 1.32 % β
β querystringparser β 10000 β 455615.18 op/sec β Β± 4.22 % β
β querystringify β 10000 β 879020.96 op/sec β Β± 2.12 % β
β querystringify-ts β 10000 β 879134.48 op/sec β Β± 2.19 % β
β node:querystring β 10000 β 1244505.97 op/sec β Β± 2.12 % β
ββββββββββββββββββββββββββββββββΌββββββββββΌββββββββββββββββββββΌββββββββββββ’
β Fastest test β Samples β Result β Tolerance β
ββββββββββββββββββββββββββββββββΌββββββββββΌββββββββββββββββββββΌββββββββββββ’
β fast-querystring β 10000 β 1953717.60 op/sec β Β± 3.16 % β
ββββββββββββββββββββββββββββββββ§ββββββββββ§ββββββββββββββββββββ§ββββββββββββ
> node benchmark/import.mjs
βββββββββββββββββββββββββββββββ€ββββββββββ€ββββββββββββββββββ€ββββββββββββ
β Slower tests β Samples β Result β Tolerance β
βββββββββββββββββββββββββββββββΌββββββββββΌββββββββββββββββββΌββββββββββββ’
β @aws-sdk/querystring-parser β 1000 β 12360.51 op/sec β Β± 0.57 % β
β qs β 1000 β 14507.74 op/sec β Β± 0.36 % β
β querystringify β 1000 β 14750.53 op/sec β Β± 0.39 % β
β query-string β 1000 β 16335.05 op/sec β Β± 0.87 % β
β querystringparser β 1000 β 17018.50 op/sec β Β± 0.42 % β
βββββββββββββββββββββββββββββββΌββββββββββΌββββββββββββββββββΌββββββββββββ’
β Fastest test β Samples β Result β Tolerance β
βββββββββββββββββββββββββββββββΌββββββββββΌββββββββββββββββββΌββββββββββββ’
β fast-querystring β 2500 β 74605.83 op/sec β Β± 0.91 % β
βββββββββββββββββββββββββββββββ§ββββββββββ§ββββββββββββββββββ§ββββββββββββ
FAQs
A fast alternative to legacy querystring module
We found that fast-querystring demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.Β It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.